<?php

namespace common\models\hospital;

use Yii;

/**
 * This is the model class for table "jg_document_list".
 *
 * @property int $id
 * @property string $excel_name excel文件名
 * @property int $item_count_all excel有效条数
 * @property int $item_count  存入的实际条数
 * @property int $size excel大小
 * @property int $type excel 所属类别
 * @property string $path 文件路径
 * @property int $created_time 录入数据库时间
 * @property string $project_name 项目简称
 */
class DocumentList extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%document_list}}';

    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['created_time'], 'integer'],
            [['excel_name'], 'string', 'max' => 255],
        ];
    }

    public static function getDb()
    {
        return Yii::$app->db3;
    }

    const patient_expense = 1;
    const registration_list = 2;

    public static $excelType = [
      self::patient_expense => '病人费用明细表',
      self::registration_list => '医院门诊挂号单据表',
    ];


    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'excel_name' => 'Excel Name',
            'created_time' => 'Created Time',
        ];
    }
}
